From ec5d192958e069820962583a1749092a67c1fec3 Mon Sep 17 00:00:00 2001 From: "chris@kneesaa.uk.xensource.com" Date: Tue, 15 Aug 2006 13:53:18 +0100 Subject: [PATCH] [qemu/ia64] Sync ID cache only guest do DMA read. Fix ID cache sync time. Only when guest does DMA read, ID sync cache is needed for VTi. From: Zhang, Xiantao Signed-off-by: Christian Limpach --- tools/ioemu/target-i386-dm/exec-dm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/ioemu/target-i386-dm/exec-dm.c b/tools/ioemu/target-i386-dm/exec-dm.c index af97adf7d8..cd7af5583f 100644 --- a/tools/ioemu/target-i386-dm/exec-dm.c +++ b/tools/ioemu/target-i386-dm/exec-dm.c @@ -449,6 +449,9 @@ void cpu_physical_memory_rw(target_phys_addr_t addr, uint8_t *buf, /* RAM case */ ptr = phys_ram_base + addr1; memcpy(ptr, buf, l); +#ifdef __ia64__ + sync_icache((unsigned long)ptr, l); +#endif } } else { if (io_index) { @@ -473,9 +476,6 @@ void cpu_physical_memory_rw(target_phys_addr_t addr, uint8_t *buf, ptr = phys_ram_base + (pd & TARGET_PAGE_MASK) + (addr & ~TARGET_PAGE_MASK); memcpy(buf, ptr, l); -#ifdef __ia64__ - sync_icache((unsigned long)ptr, l); -#endif } else { /* unreported MMIO space */ memset(buf, 0xff, len); -- 2.30.2